package com.frxuexi.lib_base.mvi

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.ViewDataBinding
import androidx.fragment.app.Fragment

abstract class BaseFragment<VDB:ViewDataBinding,UIIntent:IUiIntent,VM:BaseViewModel<UIIntent>>:Fragment() {

    abstract val  binding:VDB
    abstract val  vm:VM

    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        initView()
        initData()
        return binding.root
    }

    abstract fun initData()

    abstract fun initView()
}